﻿namespace IQKS.AWP.DataAccessLayer
{
    using Microsoft.ApplicationBlocks.Data;
    using System;
    using System.Configuration;
    using System.Data;

    public static class DataUtils
    {
        private static string connectionString =  ConfigurationManager.ConnectionStrings["ConnLeadCreation"].ConnectionString;

        public static DataSet ExecuteDataset(string storedProcedureName, params object[] parameters)
        {
            
            return SqlHelper.ExecuteDataset(connectionString, storedProcedureName, parameters);
        }

        public static int ExecuteNonQuery(string storedProcedureName, params object[] parameters)
        {
            return SqlHelper.ExecuteNonQuery(connectionString, storedProcedureName, parameters);
        }

        public static object ExecuteReader(string storedProcedureName, params object[] parameters)
        {
            return SqlHelper.ExecuteReader(connectionString, storedProcedureName, parameters);
        }

        public static object ExecuteScalar(string storedProcedureName, params object[] parameters)
        {
            return SqlHelper.ExecuteScalar(connectionString, storedProcedureName, parameters);
        }
    }
}

